package com.example.springboottestservice.event;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @author wuxinxin
 */
@Component
public class MyEventListener {

    @EventListener(classes = {ApplicationEvent.class})
    public void eventHandle(Object o){
        System.out.println("监听到事件"+o);
    }

}
